Platform Explorer / Nuxeo Platform 2023.20

Component org.nuxeo.ecm.platform.filemanager.service.FileManagerService

Documentation

The FileManager service provide a generic service for building Documents form a simple File.

Resolution Order

368
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Start Order

848
The start order represents the order in which this component has been started by the Nuxeo Runtime framework.
This number is interesting to tweak if your Java component interacts with other components, and needs to be started before or after another one.
It can be changed by implementing the method "Component#getApplicationStartedOrder()" on your Java component: components are sorted according to this reference value, in increasing order.
The default value is 1000, and the repository initialization uses number 100. Negative values can also be used.

Implementation

Class: org.nuxeo.ecm.platform.filemanager.service.FileManagerService

Services

Extension Points

XML Source

<?xml version="1.0"?>
<component
  name="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">

  <implementation
    class="org.nuxeo.ecm.platform.filemanager.service.FileManagerService" />

  <service>
    <provide interface="org.nuxeo.ecm.platform.filemanager.api.FileManager" />
  </service>

  <documentation>
    The FileManager service provide a generic service for building Documents
    form a simple File.
  </documentation>

  <extension-point name="plugins">
    <documentation>
      The plugin system for the FileManager give the possibility to register
      extension that will be responsible for creating a document from a given
      mime-type. The plugin should implement the
      org.nuxeo.ecm.platform.filemanager.interfaces.FileImporter interface.

      The registration of a file importer can be done like this:

      <code>
        <plugin name="myCustomFileImporter"
          class="com.example.MyFileImporterImplementationClass" enabled="true"
          docType="MyCustomDoctype" order="30">
          <filter>text/plain</filter>
        </plugin>
      </code>

      The filter tag is used to know what mime-types can be used with the
      plugin. The order tag is used to determine order between plugins.

      The docType attribute is optional. When added, an instance of the document type specified in it will be created. Otherwise, one of the default Nuxeo document types will be used.

      A plugin can override an existing plugin by reusing the same name, in this
      case the previous filters will be ignored. A plugin can be completely
      disabled by setting enabled="false".

      Similarly, to override the default behavior to import folders, custom
      folder importers are registered as follows:

      <code>
        <folderImporter name="myCustomFolderImporter"
          class="com.example.MyFolderImporterImplementationClass" />
      </code>

      The latest registered folder importer will be used in place of any other
      previously registered folder importer.

      Finally is it also possible to register CreationContainerListProvider
      implementations for a given set of document types so as to provide the
      user with a list of container suitable for new document creation.

      This feature is especially useful for the creation of new document from an
      office productivity application through the LiveEdit plugins.

      The docType is optional: no docType declaration means all types are
      handled by the extension.

      <code>
        <creationContainerListProvider name="myCustomContainerListProvider"
          class="com.example.MyCustomContainerListImplementationClass">
          <docType>File</docType>
          <docType>Note</docType>
        </creationContainerListProvider>
      </code>
    </documentation>

    <object
      class="org.nuxeo.ecm.platform.filemanager.service.extension.FileImporterDescriptor" />
    <object
      class="org.nuxeo.ecm.platform.filemanager.service.extension.FolderImporterDescriptor" />
    <object
      class="org.nuxeo.ecm.platform.filemanager.service.extension.CreationContainerListProviderDescriptor" />
  </extension-point>

  <extension-point name="unicity">
    <documentation>
      The unicity extension point adds a digest to the given field using the
      given algorithm. If the same file is already on the server, a new Message
      is send to JMS bus with DocumentLocation if the existing files.
      <code>
        <unicitySettings>
          <enabled>true</enabled>
          <algo>sha-256</algo>
          <field>file:content</field>
          <computeDigest>true</computeDigest>
        </unicitySettings>
      </code>
    </documentation>

    <object
      class="org.nuxeo.ecm.platform.filemanager.service.extension.UnicityExtension" />
  </extension-point>

</component>